package service;

import dao.RepairDao;
import dto.RepairDetail.RepairDetailResp;
import dto.RepairListReq;
import dto.Repair.RepairListResp;

import java.sql.SQLException;

/**
 * @author Kevin
 * @date 2020-12-29 20:08
 */
public class RepairService {

    private RepairDao dao;

    public RepairService() {
        this.dao = new RepairDao();
    }

    // 查询故障列表
    public RepairListResp repairList(RepairListReq req) {
        RepairListResp repairListResp = null;
        try {
            repairListResp = dao.repairList(req);
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        return repairListResp;
    }
    // 根据ID 查询故障列表详情
    public RepairDetailResp repairDetail(Integer repairId) throws SQLException {
        return dao.repairDetail(repairId);
    }

}
